import request from "@/utils/request";

// 验证码请求
export const getCaptchaApi = ():Promise<CaptchaApiRes>=>request.get('/users/getcaptcha')

// 删除验证码
export const delCaptchaApi = (params:DelCaptchaReq):Promise<DelCaptchaRes>=>request.post('/users/delcaptcha', params)

// 登录请求
export const loginApi = (params:LoginApiReq):Promise<LoginApiRes>=>request.post('/users/clogin',params)

// 验证token是否过期获取（依据token获取用户信息 ）
export const getUserApi = ():Promise<LoginApiRes>=>request.get('/users/getuserinfo')

// 退出登录
export const logoutApi = ():Promise<logoutRes>=>request.get('/users/logout')